#pragma once
#include <stdio.h>
#include <stdint.h>

#define MAX_COUNTS     (64)
typedef struct chanel_s
{
	int num;
	int max;
	int min;
	uint32_t last;
	double avg;
	int32_t base;

	int32_t lastdtv1;
	int32_t dtv1[MAX_COUNTS];
	int idx;


	int32_t dtv2[MAX_COUNTS];
	int idx2;

	FILE* m_file;
	int col;
	int row;
	bool flag;
}chanel_t;


int set_value(chanel_t* pchnl, uint32_t val);
void init_chanel(chanel_t* pchnl);

void set_save(chanel_t* pchnl, bool flag);